package yun.controller;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.xml.bind.ValidationEvent;

@Controller
public class TestController {
    private final Log log = LogFactory.getLog(TestController.class);

    @RequestMapping(value = {"/"},method = {RequestMethod.HEAD})
    public String head(){
        return "go.jsp";
    }

    @RequestMapping(value = {"index","/"},method = {RequestMethod.GET})
    public String index(Model model){
        System.out.println("de");
        log.info("==============index===========");
        model.addAttribute("mag","test");
        return "go.jsp";
    }
}
